package com.tang.nacos.service.impl;

import com.tang.nacos.dao.UserDao;
import com.tang.nacos.dto.UserDto;
import com.tang.nacos.dto.UserResp;
import com.tang.nacos.service.UserService;
import java.util.HashMap;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * @Author tanglingyu
 * @Date: 2021/03/08/ 16:58
 * @Description
 */
@Service
public class UserServiceImpl implements UserService {

  @Resource
  private UserDao userDao;

  @Override
  public List<UserDto> findAllUsers() {
    return userDao.findAll();
  }

  @Override
  public List<UserResp> getUserListByRoleId(Long roleId) {
    return userDao.getUserListByRoleId(roleId);
  }

  @Override
  public void saveUser(UserDto userDto) {
    userDao.save(userDto);
  }

  @Override
  public void saveUser2(List<HashMap<String, String>> list) {
    userDao.save2(list);
  }
}
